@use "../../../../styles/lib/svg";

#map {
  width: 100%;
  height: 100%;
}

@mixin button() {
  position: fixed;
  border: 1px solid #cccccf;
  background-color: #fff;
}

@mixin single-button() {
  @include button;

  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 12px;

  .icon {
    width: 100%;
    height: 100%;
  }
}

/* switch 组件 */
.area-switch {
  position: absolute;
  left: calc(50% - 60px);

  display: flex;

  overflow: hidden;

  width: 120px;
  border: 1px solid #2ecc71;
  border-radius: 14px;

  background-color: #fff;

  font-size: 14px;
  text-align: center;

  .item {
    flex: 1;
    color: #2ecc71;
    line-height: 30px;

    &.active {
      background-color: #2ecc71;
      color: #fff;
    }
  }
}

.satellite-button,
.filter-button,
.location-button,
.locate-button,
.navigate-button {
  @include single-button;
}

.satellite-button {
  top: 120px;
  right: 16px;
}

.filter-button {
  top: 180px;
  right: 16px;
}

.location-button {
  top: 240px;
  right: 16px;
}

.navigate-button {
  top: 300px;
  right: 16px;
}

.locate-button {
  right: 20px;
  bottom: 60px;
}

.scale-buttons {
  @include button;

  bottom: 60px;
  left: 20px;

  overflow: hidden;

  width: 76px;
  height: 32px;
  border-radius: 16px;

  .item {
    display: inline-block;
    height: 100%;
    padding: 6px 8px;

    image {
      width: 22px;
      height: 22px;
    }
  }
}

.select-wrapper {
  position: fixed;
  top: 180px;
  right: 60px;
  z-index: 96;

  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;

  overflow: hidden;

  border-radius: 4px;

  opacity: 0;

  transition: opacity 0.5s ease;

  &.display {
    display: flex;
  }

  .item {
    margin: 4px;
    padding: 5px 10px;
    border-radius: 4px;

    background-color: #fff;
    color: #666;

    font-size: 14px;
    line-height: 20px;
    letter-spacing: 2px;

    &.active {
      color: #2ecc71;
    }
  }
}

@for $index from 1 through 8 {
  .select-wrapper .item#{$index} {
    animation-delay: $index * 0.08s;
  }
}

.location,
.navigate {
  position: relative;
  padding: 6px 0;
  line-height: 1.4;
  text-align: left;

  &::after {
    content: " ";

    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 1px;
    border-bottom: 1px solid #cccccf;

    transform: scaleY(0.4);
    transform-origin: 0 100%;
  }

  &:last-child::after {
    display: none;
  }

  .name {
    color: #333;
    font-size: 16px;
  }

  .desc {
    color: #666;
    font-size: 14px;
  }
}

.popup {
  background-color: #fff !important;
}

.popup-header-title {
  .title {
    color: #000 !important;
  }

  .subtitle {
    color: #888 !important;
  }
}

.top-tab-header-item {
  color: #333 !important;

  .top-tab-header-text {
    border-color: #fff !important;
  }

  &.active {
    color: #000 !important;

    .top-tab-header-text {
      border-color: var(--theme-color) !important;
    }
  }
}
